<!DOCTYPE html>
<html lang = "en" >
<head >
  <meta charset = "UTF-8" >
  <title >Title</title >
    <link rel = "stylesheet" href = "{{ url_for('static', filename = 'css/bootstrap.css') }}" >
</head >
<body >
    <div class = "container" >
        <h2 >分页</h2 >
        <hr >


        <ul class = "list-group" >
            {% for user in p.items %}
                <li class = "list-group-item" >{{ user.name }}</li >
            {% endfor %}
        </ul >
        <hr >
        <ul class = "pagination" >
            {% if %}
                <a class = "page-link" href = "/pageinate/page={{ p.prev_num }}" aria-label = "Previous" >
            {% elif %}
                <a class = "page-link" href = "#" aria-label = "Previous" >
            {% endif %}
            <span aria-hidden = "true" >&laquo;</span >
            </a >
            {% for page in range(p.pages) %}
                {% if p.page == page + 1 %}
                    <li class = "page-item active" ></li >
                {% else %}
                    <li class = "page-item" ></li >
                {% endif %}
                <a class = "page-link" href = "/paginate/?page={{ page + 1 }}&per_page=3" >{{ page + 1 }}</a >
            {% endfor %}
            <a class = "page-link" href = "/pageinate/page={{ p.next_num }}" aria-label = "Next" >
                <span aria-hidden = "true" >&raquo;</span >
            </a >
        </ul >
    </div >
</body >
</html >